package com.cmes.system.core.entity;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.cmes.core.annotation.Dict;
import com.cmes.jdbc.entity.LogicEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;

import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * 用户
 *
 * @author Bruce.Gong
 * @since 1.0.0-SNAPSHOT
 */
@AllArgsConstructor
@NoArgsConstructor
@SuperBuilder
@EqualsAndHashCode(callSuper = true)
@Data
@TableName("t_sys_user")
public class UserEntity extends LogicEntity {

    @TableId
    private Long id;
    private String username;
    private String nickname;
    private String password;
    private String salt;
    @Dict("sys_user_type")
    private Integer type;
    private String avatar;
    @Dict("sys_user_gender")
    private Integer gender;
    private String mobile;
    private LocalDate birthday;
    private String remark;
    @Dict("common_enable_status")
    private Integer status;
    private Boolean sys;
    private String loginIp;
    private LocalDateTime loginTime;
    private LocalDateTime pwdModifyTime;

}
